home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok22.lha
/
MakeKickRes
/
Exec.def
next >
Wrap
Text File
|
1993-08-15
|
14KB
|
512 lines
DEFINITION MODULE Exec {"exec.library",33};
FROM SYSTEM IMPORT
ADDRESS,BITSET,BYTE,LONGSET,WORD;
IMPORT Hardware;
TYPE
Byte=[-128..127];
UByte=[0..255];
NodeType=(
unknown,task,interrupt,device,msgPort,message,freeMsg,
replyMsg,resource,library,memory,softInt,font,process,
semaphore,signalSem
);
NodePtr=POINTER TO Node;
Node=RECORD
succ:NodePtr;
pred:NodePtr;
type:NodeType;
pri:Byte;
name:ADDRESS;
END;
MinNodePtr=POINTER TO MinNode;
MinNode=RECORD
succ:MinNodePtr;
pred:MinNodePtr;
END;
List=RECORD
head:NodePtr;
tail:NodePtr;
tailPred:NodePtr;
type:NodeType;
pad:BYTE;
END;
ListPtr=POINTER TO List;
MinList=RECORD
head:MinNodePtr;
tail:MinNodePtr;
tailPred:MinNodePtr;
END;
MinListPtr=POINTER TO MinList;
Interrupt=RECORD
node:Node;
data:ADDRESS;
code:PROC;
END;
InterruptPtr=POINTER TO Interrupt;
IntVector=RECORD
data:ADDRESS;
code:PROC;
node:NodePtr;
END;
SoftIntList=RECORD
list:List;
pad:WORD;
END;
MemReqs=(
public,chip,fast,mr3,mr4,mr5,mr6,mr7,
mr8,mr9,mr10,mr11,mr12,mr13,mr14,mr15,memClear,largest
);
MemReqSet=SET OF MemReqs;
MemTypeSet=SET OF [public..mr15];
MemChunkPtr=POINTER TO MemChunk;
MemChunk=RECORD
next:MemChunkPtr;
bytes:LONGCARD;
END;
MemHeader=RECORD
node:Node;
attributes:MemTypeSet;
first:MemChunkPtr;
lower:ADDRESS;
upper:ADDRESS;
free:LONGCARD;
END;
MemHeaderPtr=POINTER TO MemHeader;
MemEntry=RECORD
CASE :INTEGER OF
| 1:reqs:MemReqSet
| 2:addr:ADDRESS
END;
length:LONGCARD;
END;
MemList=RECORD
node:Node;
numEntries:CARDINAL;
(*me:ARRAY [0..munEntries-1] OF MemEntry;*)
END;
MemListPtr=POINTER TO MemList;
MsgPortAction=(signal, softint, ignore);
TaskPtr=POINTER TO Task;
MsgPort=RECORD
node:Node;
CASE flags:MsgPortAction OF
| signal:
sigBit:UByte;
sigTask:TaskPtr;
| softint:
pad0:BYTE;
softInt:InterruptPtr;
| ignore:
pad1:BYTE;
pad2:ADDRESS
END;
msgList:List;
END;
MsgPortPtr=POINTER TO MsgPort;
Message=RECORD
node:Node;
replyPort:MsgPortPtr;
length:CARDINAL;
END;
MessagePtr=POINTER TO Message;
TaskFlags=(
procTime,tf1,tf2,tf3,stackChk,exception,switch,launch
);
TaskFlagSet=SET OF TaskFlags;
TaskState=(inval,added,run,ready,wait,except,removed);
Task=RECORD
node:Node;
flags:TaskFlagSet;
state:TaskState;
idNestCnt:BYTE;
tdNestCnt:BYTE;
sigAlloc:LONGSET;
sigWait:LONGSET;
sigRecvd:LONGSET;
sigExcept:LONGSET;
trapAlloc:BITSET;
trapAble:BITSET;
exceptData:ADDRESS;
exceptCode:PROC;
trapData:ADDRESS;
trapCode:PROC;
spReg:ADDRESS;
spLower:ADDRESS;
spUpper:ADDRESS;
switch:PROC;
launch:PROC;
memEntry:List;
userData:ADDRESS;
END;
CONST
(* Vordefinierte Signalnummern *)
sigAbort=0;
sigChild=1;
sigBlit=4;
sigDos=8;
vectSize=6;
reserved=4;
base=-vectSize;
userDef=base-reserved*vectSize-30;
nonStd=userDef;
extFunc=-24;
expunge=-18;
close=-12;
open=-6;
TYPE
LibFlags=(summing,changed,sumUsed,delExp);
LibFlagSet=SET OF LibFlags;
Library=RECORD
node:Node;
flags:LibFlagSet;
pad:BYTE;
negSize:CARDINAL;
posSize:CARDINAL;
version:CARDINAL;
revision:CARDINAL;
idString:ADDRESS;
sum:LONGCARD;
openCnt:CARDINAL;
END;
LibraryPtr=POINTER TO Library;
Device=RECORD
library:Library;
END;
DevicePtr=POINTER TO Device;
UnitFlags=(active,inTask);
UnitFlagSet=SET OF UnitFlags;
UnitPtr=POINTER TO Unit;
Unit=RECORD
msgPort:MsgPortPtr;
flags:UnitFlagSet;
pad:BYTE;
openCnt:CARDINAL;
END;
CONST
(* Standardbefehle für IORequest.command *)
invalid=0;
reset=1;
read=2;
write=3;
update=4;
clear=5;
stop=6;
start=7;
flush=8;
nonstd=9;
(* Offstes der Devicespezifischen Funktionen *)
abortIO=-36;
beginIO=-30;
TYPE
IOFlagSet=SET OF [0..7];
CONST
quick=IOFlagSet{0};
TYPE
IORequest=RECORD
message:Message;
device:DevicePtr;
unit:UnitPtr;
command:CARDINAL;
flags:IOFlagSet;
error:Byte;
END;
IORequestPtr=POINTER TO IORequest;
IOStdReq=RECORD
message:Message;
device:DevicePtr;
unit:UnitPtr;
command:CARDINAL;
flags:IOFlagSet;
error:Byte;
actual:LONGCARD;
length:LONGCARD;
data:ADDRESS;
offset:LONGCARD;
END;
IOStdReqPtr=POINTER TO IOStdReq;
Semaphore=RECORD
msgPort:MsgPort;
bids:INTEGER;
END;
SemaphoreRequest=RECORD
link:MinNode;
waiter:TaskPtr;
END;
SignalSemaphore=RECORD
link:Node;
nestCount:INTEGER;
waitQueue:MinList;
multipleLink:SemaphoreRequest;
owner:TaskPtr;
queueCount:INTEGER;
END;
SignalSemaphorePtr=POINTER TO SignalSemaphore;
ResidentFlags=(coldstart,rf1,rf2,rf3,rf4,rf5,rf6,autoinit);
ResidentFlagSet=SET OF ResidentFlags;
ResidentPtr=POINTER TO Resident;
Resident=RECORD
matchWord:CARDINAL;
matchTag:ResidentPtr;
endSkip:ADDRESS;
flags:ResidentFlagSet;
version:UByte;
type:NodeType;
pri:Byte;
name:ADDRESS;
idString:ADDRESS;
init:ADDRESS;
END;
CONST
matchword=04AFCH;
TYPE
AttnFlags=(
m68010,m68020,af2,af3,m68881,af5,af6,af7,
reserved8,reserved9
);
AttnFlagSet=SET OF AttnFlags;
ExecBase=RECORD
libNode:Library;
softVer:CARDINAL;
lowMemChkSum:INTEGER;
chkBase:LONGCARD;
coldCapture:ADDRESS;
coolCapture:ADDRESS;
warmCapture:ADDRESS;
sysStkUpper:ADDRESS;
sysStkLower:ADDRESS;
maxLocMem:LONGCARD;
debugEntry:ADDRESS;
debugData:ADDRESS;
alertData:ADDRESS;
maxExtMem:ADDRESS;
chkSum:CARDINAL;
intVects:ARRAY Hardware.IntFlags OF IntVector;
thisTask:TaskPtr;
idleCount:LONGCARD;
dispCount:LONGCARD;
quantum:CARDINAL;
elapsed:CARDINAL;
sysFlags:CARDINAL;
idNestCnt:BYTE;
tdNestCnt:BYTE;
attnFlags:AttnFlagSet;
attnResched:CARDINAL;
resModules:ADDRESS;
taskTrapCode:PROC;
taskExceptCode:PROC;
taskExitCode:PROC;
taskSigAlloc:LONGSET;
taskTrapAlloc:BITSET;
memList:List;
resourceList:List;
deviceList:List;
intrList:List;
libList:List;
portList:List;
taskReady:List;
taskWait:List;
softInts:ARRAY [0..4] OF SoftIntList;
lastAlert:ARRAY [0..3] OF LONGINT;
vBlankFrequency:UByte;
powerSupplyFrequency:UByte;
semaphoreList:List;
kickMemPtr:ADDRESS;
kickTagPtr:ADDRESS;
kickCheckSum:LONGINT;
execBaseReserved:ARRAY [0..9] OF BYTE;
execBaseNewReserved:ARRAY [0..19] OF BYTE;
END;
ExecBasePtr=POINTER TO ExecBase;
VAR
execBase[4]:ExecBasePtr;
PROCEDURE AbortIO(iORequest{9}:ADDRESS); CODE -480;
PROCEDURE AddDevice(device{9}:DevicePtr); CODE -432;
PROCEDURE AddHead(list{8}:ListPtr;
node{9}:ADDRESS); CODE -240;
PROCEDURE AddIntServer(intNum{0}:INTEGER;
interrupt{9}:InterruptPtr); CODE -168;
PROCEDURE AddLibrary(library{9}:LibraryPtr); CODE -396;
PROCEDURE AddMemList(size{0}:LONGINT;
attributes{1}:MemReqSet;
pri{2}:LONGINT;
base{8}:ADDRESS;
name{9}:ADDRESS):LONGINT; CODE -618;
PROCEDURE AddPort(port{9}:MsgPortPtr); CODE -354;
PROCEDURE AddResource(resource{9}:ADDRESS); CODE -486;
PROCEDURE AddSemaphore(
signalSemaphore{8}:SignalSemaphorePtr); CODE -600;
PROCEDURE AddTail(list{8}:ListPtr;
node{9}:ADDRESS); CODE -246;
PROCEDURE AddTask(task{9}:TaskPtr;
initialPC{10}:ADDRESS;
finalPC{11}:ADDRESS); CODE -282;
PROCEDURE Alert(alertNum{7}:LONGINT;
parameters{13}:ADDRESS); CODE -108;
PROCEDURE AllocAbs(byteSize{0}:LONGINT;
location{9}:ADDRESS):ADDRESS; CODE -204;
PROCEDURE Allocate(freeList{8}:MemHeaderPtr;
byteSize{0}:LONGINT):ADDRESS; CODE -186;
PROCEDURE AllocEntry(
memList1{8}:MemListPtr):MemListPtr; CODE -222;
PROCEDURE AllocMem(
byteSize{0}:LONGINT;
requirements{1}:MemReqSet):ADDRESS; CODE -198;
PROCEDURE AllocSignal(
signalNum1{0}:LONGINT):LONGINT; CODE -330;
PROCEDURE AllocTrap(trapNum1{0}:LONGINT):LONGINT; CODE -342;
PROCEDURE AttemptSemaphore(
signalSemaphore{8}:SignalSemaphorePtr
):LONGINT; CODE -576;
PROCEDURE AvailMem(
requirements{1}:MemReqSet):LONGINT; CODE -216;
PROCEDURE Cause(interrupt{9}:InterruptPtr); CODE -180;
PROCEDURE CheckIO(ioRequest{9}:ADDRESS):ADDRESS; CODE -468;
PROCEDURE CloseDevice(ioRequest{9}:ADDRESS); CODE -450;
PROCEDURE CloseLibrary(library{9}:LibraryPtr); CODE -414;
PROCEDURE CopyMem(source{8}:ADDRESS;
dest{9}:ADDRESS;
size{0}:LONGINT); CODE -624;
PROCEDURE CopyMemQuick(source{8}:ADDRESS;
dest{9}:ADDRESS;
size{0}:LONGINT); CODE -630;
PROCEDURE Deallocate(freeList{8}:MemHeaderPtr;
memoryBlock{9}:ADDRESS;
byteSize{0}:LONGINT); CODE -192;
PROCEDURE Debug(); CODE -114;
PROCEDURE Disable(); CODE -120;
(* PRIVATE *) PROCEDURE Dispatch(); CODE -60;
PROCEDURE DoIO(ioRequest{9}:ADDRESS); CODE -456;
PROCEDURE Enable(); CODE -126;
PROCEDURE Enqueue(list{8}:ListPtr;
node{9}:ADDRESS); CODE -270;
(* PRIVATE *) PROCEDURE Exception(); CODE -66;
(* PRIVATE *) PROCEDURE ExitIntr(); CODE -36;
PROCEDURE FindName(start{8}:ADDRESS;
name{9}:ADDRESS):ADDRESS; CODE -276;
PROCEDURE FindPort(name{9}:ADDRESS):MsgPortPtr; CODE -390;
PROCEDURE FindResident(
name{9}:ADDRESS):ResidentPtr; CODE -96;
PROCEDURE FindSemaphore(
name{8}:ADDRESS):SignalSemaphorePtr; CODE -594;
PROCEDURE FindTask(name{9}:ADDRESS):TaskPtr; CODE -294;
PROCEDURE Forbid(); CODE -132;
PROCEDURE FreeEntry(memList{8}:MemListPtr); CODE -228;
PROCEDURE FreeMem(memoryBlock{9}:ADDRESS;
byteSize{0}:LONGINT); CODE -210;
PROCEDURE FreeSignal(signalNum{0}:LONGINT); CODE -336;
PROCEDURE FreeTrap(trapNum{0}:LONGINT); CODE -348;
PROCEDURE GetCC():BITSET; CODE -528;
PROCEDURE GetMsg(port{8}:MsgPortPtr):ADDRESS; CODE -372;
PROCEDURE InitCode(startClass{0}:ResidentFlagSet;
version{1}:LONGINT); CODE -72;
PROCEDURE InitResident(resident{9}:ResidentPtr;
segList{1}:ADDRESS); CODE -102;
PROCEDURE InitSemaphore(
signalSemaphore{8}:SignalSemaphorePtr); CODE -558;
PROCEDURE InitStruct(initTable{9}:ADDRESS;
memory{10}:ADDRESS;
size{0}:CARDINAL); CODE -78;
PROCEDURE Insert(list{8}:ListPtr;
node{9}:ADDRESS;
listNode{10}:ADDRESS); CODE -234;
PROCEDURE MakeFunctions(target{8}:ADDRESS;
functArray{9}:ADDRESS;
functDispBase{10}:ADDRESS); CODE -90;
PROCEDURE MakeLibrary(
vectors{8}:ADDRESS;
structure{9}:ADDRESS;
init{10}:ADDRESS;
dataSize{0}:LONGINT;
segList{1}:ADDRESS):LibraryPtr; CODE -84;
PROCEDURE ObtainSemaphore(
signalSemaphore{8}:SignalSemaphorePtr); CODE -564;
PROCEDURE ObtainSemaphoreList(list{8}:ListPtr); CODE -582;
PROCEDURE OldOpenLibrary(
libName{9}:ADDRESS):LibraryPtr; CODE -408;
PROCEDURE OpenDevice(devName{8}:ADDRESS;
unitNumber{0}:LONGINT;
ioRequest{9}:ADDRESS;
flags{1}:LONGSET); CODE -444;
PROCEDURE OpenLibrary(
libName{9}:ADDRESS;
version{0}:LONGINT):LibraryPtr; CODE -552;
PROCEDURE OpenResource(resName{9}:ADDRESS):ADDRESS; CODE -498;
PROCEDURE Permit(); CODE -138;
PROCEDURE Procure(
semaphore{8}:MsgPortPtr;
bidMessage{9}:MsgPortPtr):LONGINT; CODE -540;
PROCEDURE PutMsg(port{8}:MsgPortPtr;
message{9}:ADDRESS); CODE -366;
(* PRIVATE *) PROCEDURE RawDoFmt(
formatString{8}:ADDRESS;
dataStream{9}:ADDRESS;
putChProc{10}:ADDRESS;
putChData{11}:ADDRESS); CODE -522;
(* PRIVATE *) PROCEDURE RawIOInit(); CODE -504;
(* PRIVATE *) PROCEDURE RawMayGetChar():CHAR; CODE -510;
(* PRIVATE *) PROCEDURE RawPutChar(ch{0}:CHAR); CODE -516;
PROCEDURE ReleaseSemaphore(
signalSemaphore{8}:SignalSemaphorePtr); CODE -570;
PROCEDURE ReleaseSemaphoreList(list{8}:ListPtr); CODE -588;
PROCEDURE RemDevice(device{9}:DevicePtr):LONGINT; CODE -438;
PROCEDURE RemHead(list{8}:ListPtr):ADDRESS; CODE -258;
PROCEDURE RemIntServer(intNum{0}:INTEGER;
interrupt{9}:InterruptPtr); CODE -174;
PROCEDURE RemLibrary(
library{9}:LibraryPtr):LONGINT; CODE -402;
PROCEDURE Remove(node{9}:ADDRESS); CODE -252;
PROCEDURE RemPort(port{9}:MsgPortPtr); CODE -360;
PROCEDURE RemResource(resource{9}:ADDRESS); CODE -492;
PROCEDURE RemSemaphore(
signalSemaphore{8}:SignalSemaphorePtr); CODE -606;
PROCEDURE RemTail(list{8}:ListPtr):ADDRESS; CODE -264;
PROCEDURE RemTask(task{9}:TaskPtr); CODE -288;
PROCEDURE ReplyMsg(message{9}:ADDRESS); CODE -378;
(* PRIVATE *) PROCEDURE Reschedule(); CODE -48;
(* PRIVATE *) PROCEDURE Schedule(); CODE -42;
PROCEDURE SendIO(ioRequest{9}:ADDRESS); CODE -462;
PROCEDURE SetExcept(newSignals{0}:LONGSET;
signalMask{1}:LONGSET):LONGSET; CODE -312;
PROCEDURE SetFunction(
library{9}:LibraryPtr;
funcOffset{8}:INTEGER;
funcEntry{0}:ADDRESS):ADDRESS; CODE -420;
PROCEDURE SetIntVector(
intNumber{0}:Hardware.IntFlags;
interrupt{9}:InterruptPtr):InterruptPtr; CODE -162;
PROCEDURE SetSignal(newSignals{0}:LONGSET;
signalMask{1}:LONGSET):LONGSET; CODE -306;
PROCEDURE SetSR(newSR{0}:BITSET;
mask{1}:BITSET):BITSET; CODE -144;
PROCEDURE SetTaskPri(task{9}:TaskPtr;
priority{0}:Byte):Byte; CODE -300;
PROCEDURE Signal(task{9}:TaskPtr;
signals{0}:LONGSET); CODE -324;
PROCEDURE SumKickData(): LONGINT; CODE -612;
PROCEDURE SumLibrary(library{9}:LibraryPtr); CODE -426;
PROCEDURE SuperState():ADDRESS; CODE -150;
(* PRIVATE *) PROCEDURE Supervisor(); CODE -30;
(* PRIVATE *) PROCEDURE Switch(); CODE -54;
PROCEDURE TypeOfMem(address{9}:ADDRESS):MemReqSet; CODE -534;
PROCEDURE UserState(sysStack{0}:ADDRESS); CODE -156;
PROCEDURE Vacate(semaphore{8}:MsgPortPtr); CODE -546;
PROCEDURE Wait(signalSet{0}:LONGSET):LONGSET; CODE -318;
PROCEDURE WaitIO(ioRequest{9}:ADDRESS); CODE -474;
PROCEDURE WaitPort(port{8}:MsgPortPtr); CODE -384;
END Exec.